Skip to content

fix(desktop): preserve GIF graphic control scope#2432

Open
atishpatel wants to merge 1 commit into
mainfrom
atish/fix-gif-plain-text-gce
Open

fix(desktop): preserve GIF graphic control scope#2432
atishpatel wants to merge 1 commit into
mainfrom
atish/fix-gif-plain-text-gce

Conversation

@atishpatel

@atishpatel atishpatel commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Why

The GIF sanitizer removes Plain Text Extensions but previously retained their preceding Graphic Control Extensions, allowing delay, disposal, or transparency state to leak onto the next image frame.

What

  • Track emitted graphic-control extensions until a rendering block consumes them
  • Remove pending graphic-control state when stripping a Plain Text Extension
  • Add regression coverage for a GCE followed by plain text and an image

Risk Assessment

Low — isolated to GIF metadata sanitization; clean GIFs and graphic-control extensions attached to image frames remain byte-identical.

Verification

  • Built and launched the PR branch with just dev against the local relay
  • Confirmed the original catjam.gif reproduces the relay 422 metadata rejection
  • Ran the branch sanitizer on catjam.gif and confirmed the sanitized GIF uploads successfully as image/gif
  • Downloaded the uploaded blob and verified its SHA-256 matches the relay descriptor (80f4533bd59e065dc2ad3e51dcbfa44c454dd9a61c17f651b48f9c500f7dd793)
  • Verified both original and sanitized GIFs remain 48×48 with all 158 animation frames
  • just desktop-tauri-test
  • just desktop-tauri-clippy
  • just desktop-check

References

Generated with Codex

Co-authored-by: Codex <noreply@openai.com>
@atishpatel
atishpatel marked this pull request as ready for review July 23, 2026 00:00
@atishpatel
atishpatel requested a review from a team as a code owner July 23, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant